package com.itcast.tanhuaserver.domain;

import com.itcast.tanhuaserver.domain.User;

/**
 * @PachageName: com.itcast.tanhuaserver.utils
 * @ClassName:
 * @Description: TODO
 * @Author: Hushi
 * @DateTime: 2021/2/1718:03
 * @Version 1.0
 */
public class UserThreadLocal {
    private static final ThreadLocal<User> LOCAL = new ThreadLocal<>();

    private UserThreadLocal(){

    }

    public static void set(User user){
        LOCAL.set(user);
    }

    public static User get(){
        return LOCAL.get();
    }
}
